Setting the Date Format Based on the User's Locale

Description

The date and time format can be dynamically set using the culture code on the user's device. The day and month names can also be dynamically changed based on device locale settings.

Discussion

You can specify that the date format, day names and month names for a Grid and UX component should be automatically selected based on the 'Accept-language' property in the request header when the browser makes a request. This makes it easier to build applications that seamlessly adapt based on the user's locale setting.

To use locale settings, set the Date format to:

<cultureDateFormat>

If you also want to include time in the format, you can use the following:

<cultureDateFormat> <cultureTimeFormat>

You can also configure the day and month names to use the user's locale.

To use day names based on the user's locale, set the Date picker - day names property to:

<cultureDayNames>

To use month names based on the user's locale, set the Date picker - month names property to:

<cultureMonthNames>

See Also